/**
 * 
 */
package org.ycsoft.MetroidReader;

import java.io.Serializable;

/**
 * Represents the metadata in a metroid file
 * @author allad
 *
 */
public class MetroidMetadata implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4568824190733639808L;
	private String city = null;
	private String language = null;
	private String mean = null;
	private String version = null;
	private String author = null;
	
	private long stopsIndexPosition = -1;
	private long linesIndexPosition = -1;
	private long stopsNamesIndexPosition = -1;
	
	private int nbStops = -1;
	private int nbLines = -1;
	
	public MetroidMetadata(){
	
	}
	
	public void setNbStops(int nb){
		nbStops = nb;
	}
	
	/**
	 * @return the number of stops in the map
	 */
	public int getNbStops(){
		return nbStops;
	}
	
	/**
	 * Sets the number of line in the map
	 * @param nb
	 */
	public void setNbLines(int nb){
		nbLines = nb;
	}
	
	/**
	 * @return the number of line in the map
	 */
	public int getNbLines(){
		return nbLines;
	}
	
	public void setCity(String value){
		city = value;
	}
	
	public String getCity(){
		return city;
	}
	
	public void setMean(String value){
		mean = value;
	}
	
	public String getMean(){
		return mean;
	}
	
	public void setLanguage(String value){
		language = value;
	}
	
	public String getLanguage(){
		return language;
	}
	
	public void setVersion(String value){
		version = value;
	}
	
	public String getVersion(){
		return version;
	}
	
	public void setStopsIndexPosition(long pos){
		stopsIndexPosition = pos;
	}
	
	public long getStopsIndexPosition(){
		return stopsIndexPosition;
	}
	
	public void setLinesIndexPosition(long pos){
		linesIndexPosition = pos;
	}
	
	public long getLinesIndexPosition(){
		return linesIndexPosition;
	}
	
	public void setStopsNamesIndexPosition(long pos){
		stopsNamesIndexPosition = pos;
	}
	
	public long getStopsNamesIndexPosition(){
		return stopsNamesIndexPosition;
	}
	
	public void setAuthor(String author){
		this.author = author;
	}
	
	public String getAuthor(){
		if(! author.trim().toLowerCase().equals("unknown"))
			return author;
		else return null;
	}
}
